
import 'package:decimal/decimal.dart';
import 'package:json_annotation/json_annotation.dart';
part 'EcyGoodsCartItemModel.g.dart';

@JsonSerializable()
class EcyGoodsCartItemModel {
  String? id;
  String? skuId;
  String? productName;
  String? skuName;
  String? image;
  int? quantity;
  String? addon;
  Decimal? price;
  String? remark;
  String? salePrice;
  bool? selected;
  bool? editing;
  int? operation;
  EcyGoodsCartItemModel(this.remark, this.productName, this.skuName, this.id,
      this.image, this.salePrice, this.quantity, this.selected, this.editing, this.skuId, this.addon, this.price, this.operation);

  // 从JSON创建User实例的工厂方法
  factory EcyGoodsCartItemModel.fromJson(Map<String, dynamic> json) =>
      _$EcyGoodsCartItemModelFromJson(json);

  // 将User实例转换为JSON的方法
  Map<String, dynamic> toJson() => _$EcyGoodsCartItemModelToJson(this);
}
